Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUP-20798: fixes shebang, HOMEDIR grep, su shell, if -ne typo #761

Closed
wants to merge 1 commit into from

Conversation

t29j
Copy link
Contributor

@t29j t29j commented Oct 10, 2024

General information

I am Checkmk employee.

The mk_db2.aix agent plugin did not work on a recent AIX 7.2

During a session with a customer we were able to make it work again.

We found and fixed around 3 problems.
One of them is a typo in a if statement that was in the code since 2015.

Bug reports

  • OS AIX 7.2 on power architecture
  • See SUP-20798 for details

Proposed changes

Please just have a look into a side by side diff.

  • Line 1 ksh93 seems to be more current than ksh

  • Line 68 tried to extract the user home directory. The grep at the end does not make sense, it assumes that the homedir also contains the instancename/username which is not always the case. I made the first grep more specific with -w and also adding the colon : to not to match users that contain the value of $INSTANCE as substring.

  • Line 72, we added to - because this gives a completer environment, a login environ.
    I this case the $INSTANCE users SHELL is csh. csh is very limited and can not interpret the code in the EOT block.
    Therefore we let the EOT heredocument block run also in ksh93.

    • Line 102 was obviously a typo

Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@t29j
Copy link
Contributor Author

t29j commented Oct 10, 2024

If accepted please also pick this into 2.3.0 and 2.2.0

Copy link

This PR is stale because it has been open for 14 days with no activity and the Github Actions are not passing.

@github-actions github-actions bot added the Stale Scheduled for auto-close label Oct 25, 2024
Copy link

github-actions bot commented Nov 9, 2024

This PR was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this Nov 9, 2024
@logan-connolly
Copy link
Member

@mo-ki could you please have a look at this change?

@github-actions github-actions bot removed the Stale Scheduled for auto-close label Dec 12, 2024
CheckmkCI pushed a commit that referenced this pull request Dec 12, 2024
SUP-20798

Closes: #761
Co-authored-by: Logan Connolly <[email protected]>
Change-Id: I9051a84cc1595f0780b0a8cb5704f875cd9f8ea3
@CheckmkCI CheckmkCI closed this in b7543a2 Dec 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants